package com.example.android.analytics;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

public class SecondActivity extends Activity {

  private TextView purchaseConfirmation;

  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.secondactivity);

    purchaseConfirmation = (TextView) findViewById(R.id.purchaseConfirmation);
  }

  public void buyDandyHatPressed(View v) {
    purchaseConfirmation.setText("My, that's a dandy hat!");
  }

  public void buyDapperHatPressed(View v) {
    purchaseConfirmation.setText("Wow, someone looks dapper!");
  }

  public void buyWizardHatPressed(View v) {
    purchaseConfirmation.setText("Accio hat!");
  }
}
